package com.weishe.loc;

import java.util.HashMap;

public class ThreeMap {
	String[] key = { "", "", "" };
	long[] value = { 0l, 0l, 0l };

	public void put(String k, long v) {
		for (int i = 0; i < 3; i++) {
			if (v > value[i]) {
				key[i] = k;
				value[i] = v;
				return;
			}
		}

	}

	public HashMap<String, Long> getAll() {
		HashMap<String, Long> m = new HashMap<String, Long>();
		for (int i = 0; i < 3; i++) {
			if (!key[i].isEmpty()) {
				m.put(key[i], value[i]);
			}
		}

		return m;
	}
}
